package lanqiaotrain.t2;

import javax.sound.midi.SoundbankResource;
import java.util.ArrayList;
import java.util.Scanner;

/**
 * @Author: Hasee
 * @Date: 2020-09-01 07:58:55
 */
public class Basic6 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a=new int[n+1];
        int[] b=new int[n+1];
        for (int i=0;i<n;i++){
            a[i]=0;
        }
        a[0]=1;
        for (int i=1;i<=n;i++){
            for (int j=1;j<=i;j++){
                b[j]=a[j]+a[j-1];
                System.out.printf("%d ",b[j]);
            }
            for (int j=0;j<=i;j++){
                a[j]=b[j];
            }
            System.out.println();
        }
    }
}
